home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / qbwinfnt.zip / EX_BSVFT.BAS < prev    next >
BASIC Source File  |  1994-03-01  |  1KB  |  41 lines

  1.       REM:  EX_BSVFT.BAS, Unregistered Version 1.0
  2.       REM:  Example of using BSAVE to store a font array to disk.
  3.  
  4.       DECLARE SUB BSAVEFont (FlName$, FontArray%())
  5.       DECLARE SUB FastString (Text$, FClr%, X%, Y%, FontArray%())
  6.       DECLARE SUB LoadRsrcFileFont (FlName$, FontNum%, FontArray%(), RetCode%, RetMsg$)
  7.      
  8.       '...setup a VGA screen mode...
  9.       SCREEN 12
  10.      
  11.       '...dim array for font data (use REDIM so its DYNAMIC)...
  12.       REDIM FontArray%(1)
  13.     
  14.       PRINT : PRINT "Loading a font from SAMPLE.FON..."
  15.     
  16.       '...load the font in the example FON file...
  17.       CALL LoadRsrcFileFont("SAMPLE.FON", 1, FontArray%(), RetCode%, RetMsg$)
  18.      
  19.       IF (RetCode% <> 0) THEN
  20.         PRINT "***** ERROR: RetCode% = "; RetCode%
  21.         PRINT "***** "; RetMsg$
  22.         STOP
  23.       END IF
  24.  
  25.       '...display a sample of the font...
  26.       CALL FastString("Sample of Font ", 4, 10, 60, FontArray%())
  27.  
  28.       LOCATE 8, 1: PRINT "BSAVE font array to file TEST.BIN...";
  29.      
  30.       '...save the file using BSAVE for quick future access...
  31.       CALL BSAVEFont("TEST.BIN", FontArray%())
  32.  
  33.       PRINT "Completed!": PRINT
  34.  
  35.       PRINT "See the example EX_BLDFT.BAS for an example of loading"
  36.       PRINT "a font file created with BSAVE."
  37.  
  38.       END
  39.     
  40.  
  41.